<?php

use Illuminate\Database\Seeder;

class PermissionSeeder extends Seeder
{
    private $rules = array([
        'name' => 'patientType',
        'slug' => 'patientType',
        'description' => '病患类型模块所有',
        ],[
        'name' => 'deportment',
        'slug' => 'deportment',
        'description' => '部门模块所有权限',
        ],[
        'name' => 'media',
        'slug' => 'media',
        'description' => '媒体模块所有',
        ],[
            'name' => 'doctor',
            'slug' => 'doctor',
            'description' => '医生模块所有',
        ],[
            'name' => 'user',
            'slug' => 'user',
            'description' => '用户模块所有',
        ],[
        'name' => 'role',
        'slug' => 'role',
        'description' => '角色模块所有',
        ],[
        'name' => 'permission',
        'slug' => 'permission',
        'description' => '权限模块所有',
        ],[
            'name' => 'patient',
            'slug' => 'patient',
            'description' => '登记模块所有',
        ],[
            'name' => 'patient',
            'slug' => 'patient.all',
            'description' => '登记模块所有',
        ],[
            'name' => 'patient',
            'slug' => 'patient.all.user',
            'description' => '用户查看自己登记模块数据',
        ],[
        'name' => '医生查看数据',
        'slug' => 'patient.all.doctor',
        'description' => '登记模块，医生查看自己数据',
        ],[
        'name' => '部门查看自己部门数据',
        'slug' => 'patient.all.deportment',
        'description' => '登记模块，医生查看自己数据',
        ],[
            'name' => 'patient',
            'slug' => 'patient.store',
            'description' => '登记模块，上传数据',
        ],[
            'name' => 'patient',
            'slug' => 'patient.update',
            'description' => '登记模块，修改数据',
        ],[
            'name' => 'patient',
            'slug' => 'patient.show',
            'description' => '登记模块查看单条数据',
        ],[
            'name' => 'patient',
            'slug' => 'patient.delete',
            'description' => '登记模块，删除数据',
        ],
    );

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach ($this->rules as $v){
           \App\Entities\Permission::create($v);
        }
    }
}
